//
//  YLDeveloperCompatible.swift
//  Swaddle
//
//  Created by memory on 2021/5/17.
//

import Foundation
import UIKit

public final class YLDevelop<Base> {
    public let base: Base
    public init(_ base: Base) {
        self.base = base
    }
}

public protocol YCDevelopCompatible {
    associatedtype YCDevelopType
    var yl: YLDevelop<YCDevelopType> { get }
    static var yl: YLDevelop<YCDevelopType>.Type { get }
}

extension YCDevelopCompatible {
    public var yl: YLDevelop<Self> {
        get { return YLDevelop(self) }
    }
    public static var yl: YLDevelop<Self>.Type {
        get { return YLDevelop<Self>.self }
    }
}

extension String:           YCDevelopCompatible { }
extension NSAttributedString: YCDevelopCompatible { }
extension UIView:           YCDevelopCompatible { }
extension CALayer:          YCDevelopCompatible { }

